package cn.jiahua.hospital.service;

import cn.jiahua.hospital.pojo.User;

import java.util.Date;
import java.util.List;
import java.util.Map;

import cn.jiahua.hospital.dto.Page;
import cn.jiahua.hospital.service.impl.EstSQLException;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created by shang-pc on 2015/11/7.
 */
public interface UserService {


    public User getUserById(Integer id);

    public List<User> getUserListByMap(Map<String, Object> param);

    public Integer getUserCountByMap(Map<String, Object> param);

    public Integer qdtxAddUser(User user);

    public Integer qdtxModifyUser(User user);

    public Integer qdtxDeleteUserById(Integer id);

    public Integer qdtxBatchDeleteUser(String ids);

    public Page<User> queryUserPageByMap(Map<String, Object> param, Integer pageNo, Integer pageSize);

    //短信登录
    public User getUserByPhone(@Param(value = "phone") String phone) throws EstSQLException;

    //微信登录时绑定手机号码
    public User getUserByPhoneOpenid(@Param(value = "phone") String phone, @Param(value = "userWeChatOpenId") String userWeChatOpenId);

    //根据用户名和性别模糊查询,当前页码和页容量分页
    public List<User> userSelectPage(@Param(value = "userName") String userName,
                                     @Param(value = "userSex") Integer userSex,
                                     @Param(value = "pageNo") Integer pageNo,
                                     @Param(value = "pageSize") Integer pageSize);

    //查询总数
    public Integer userSelectCount(@Param(value = "userName") String userName,
                                   @Param(value = "userSex") Integer userSex);


    //根据用户名和性别模糊查询,当前页码和页容量分页  (拉黑)
    public List<User> userSelectPage1(@Param(value = "userName") String userName,
                                      @Param(value = "userSex") Integer userSex,
                                      @Param(value = "pageNo") Integer pageNo,
                                      @Param(value = "pageSize") Integer pageSize);

    public Integer userSelectCount1(@Param(value = "userName") String userName,
                                    @Param(value = "userSex") Integer userSex);
}
